-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: improve shellcheck fix messages #284
feat: improve shellcheck fix messages #284
Conversation
eda5bdd
to
08024e5
Compare
There's opportunity here to take some of the warnings that shellcheck does not currently emit
|
Agree that we shouldn't pursue adding our own fixes to ShellCheck errors. If ShellCheck doesn't supply a fix, neither should we. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly just nits related to variable naming and getting doc comments to link to definitions.
Co-authored-by: Andrew Frantz <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks really good and something we might build upon for a general purpose fixing framework for lint diagnostics in the future.
Just a few nits and minor comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM after Peter's comments are addressed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good (pending fix to the CI).
Thanks again for this work as it'll definitely improve the UX with shellcheck installed!
Describe the problem or feature in addition to a link to the issues.
Partially addresses #276 .
This PR improves ShellCheck lint messages by parsing, when available, the
fix
field and applying the suggested replacements. To enable this, thefix
module was added which is closely modeled after shellcheck's own Fixer. The intent for this module is for it be usable by other lint rules to suggest and apply their own replacements using a consistent framework, but this is out-of-scope for this PR.Before submitting this PR, please make sure:
changes (when appropriate).
CHANGELOG.md
(see"keep a changelog" for more information).